PSET Statement ---------------------------------------------------------------------------- Action Draws a specified point on the screen. Syntax PSET STEP( x%, y%) , color& Remarks The following list describes the parts of the PSET statement. ----------------------------------------------------------------------------- Part Description ---------------------------------------------------------------------------- STEP Indicates that x% and y% are Part Description ---------------------------------------------------------------------------- STEP Indicates that x% and y% are relative, not absolute. Coordinates are treated as distances from the most recent graphics cursor location, not distances from the (0,0) screen coordinate. For example, if the most recent graphics cursor location were (10,10), PSET STEP (10,5) would refer to the point at (20,15). x% The x coordinate of the pixel that is to be set. y% The y coordinate of the pixel that is to be set. Part Description ---------------------------------------------------------------------------- color& The color attribute for the specified pixel. The valid range of screen coordinate values and color values depends on the screen mode established by the most recently executed SCREEN statement. If a coordinate is outside the current viewport, no action is taken, nor is an error message generated. If you use PSET without specifying color&, the foreground color is selected. In contrast, if you use PRESET without specifying color&, the background color is selected. Otherwise, the two statements work exactly the same. See Also PRESET Example The following example draws a line from (0,0) to (100,100), then erases the line by writing over it with the background color. SCREEN 2 FOR I = 0 TO 100 PSET (I, I) NEXT I LOCATE 16, 2. INPUT "Press the Return key to erase the line ", Gar$ ' Now erase the line. PSET (I - 1, I - 1), 0 FOR I = 0 TO 100 PSET STEP(-1, -1), 0 NEXT I LOCATE 16, 2. PRINT " "